package com.yanqu.road.logic.pb;

import com.yanqu.road.entity.activity.tonbing.data.CrossTonBingPatrons;
import com.yanqu.road.pb.activity.TonBingProto;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class CrossTonBingPb {

    public static Map<Integer, CrossTonBingPatrons> parseCrossTonBingPatrons(List<TonBingProto.TonBingPatronsTempMsg> msgList) {
        Map<Integer, CrossTonBingPatrons> patronsMap = new ConcurrentHashMap<>();
        for (TonBingProto.TonBingPatronsTempMsg msg : msgList) {
            patronsMap.put(msg.getId(), new CrossTonBingPatrons(msg.getId(), msg.getSkin(), msg.getAbility()));
        }
        return patronsMap;
    }

}
